package com.project.weimi.activity;

import com.project.weimi.R;
import com.project.weimi.utils.SetClickListener;
import com.project.weimi.widget.EditTextWithDel;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

public class BindPhoneActivity extends BaseActivity{

	private LinearLayout ll_bind,ll_bindSuccess;
	private EditTextWithDel et_phone,et_verificationCode;
	private Button btn_verificationCode,btn_bind;
	private TextView tv_tips;
	
	@Override
	protected void onCreate(Bundle arg0) {
		super.onCreate(arg0);
		setContentViewWithBar(R.layout.activity_bind_phone, "绑定手机");
		
		initView();
		
	}
	
	private void initView(){
		ll_bind = (LinearLayout)findViewById(R.id.ll_bind);
		ll_bindSuccess = (LinearLayout)findViewById(R.id.ll_bindSuccess);
		et_phone = (EditTextWithDel)findViewById(R.id.et_phone);
		et_verificationCode = (EditTextWithDel)findViewById(R.id.et_verificationCode);
		btn_verificationCode = (Button)findViewById(R.id.btn_verificationCode);
		btn_bind = (Button)findViewById(R.id.btn_bind);
		tv_tips = (TextView)findViewById(R.id.tv_tips);
		
		// 监听
		SetClickListener.setClickListener(listener, btn_verificationCode,btn_bind);
		
	}
	
	private OnClickListener listener = new OnClickListener() {
		
		@Override
		public void onClick(View v) {

			switch (v.getId()) {
			case R.id.btn_verificationCode:
				int a = 26;
				btn_verificationCode.setBackgroundResource(R.drawable.shape_btn_bind_phone_grey);
				btn_verificationCode.setText("重新获取("+a+")");
				break;
			case R.id.btn_bind:
				ll_bind.setVisibility(View.GONE);
				ll_bindSuccess.setVisibility(View.VISIBLE);
				
				break;
			}
		}
	};
	
	
	@Override
	void setStatusBar(int statusBarColorRes) {
		super.setStatusBar(R.color.transparent_3);
	}
	
}
